import request from '@/utils/request'
// 获取全部用户信息
export const getEmployeesUser = (params) =>
  request({
    url: '/users',
    params
  })
// 获取指定用户
export const getEmployeesRole = (id) =>
  request({
    url: '/users/' + id
  })
// 获取全部角色列表
export const getEmployeesRoleList = (params) =>
  request({
    url: '/roles',
    params
  })
// 编辑用户
export const editUser = (data) =>
  request({
    url: '/users/' + data.id,
    method: 'put',
    data
  })
// 删除用户
export const deleteUser = (id) =>
  request({
    url: '/users/' + id,
    method: 'delete'
  })
// 用户总数
export const userCount = () =>
  request({
    url: '/users/count'
  })
// 新增用户
export const addUser = (data) =>
  request({
    url: '/auth/local/register',
    method: 'post',
    data
  })
